package uTatrusTests;

import static org.junit.Assert.*;

import org.junit.After;
import org.junit.AfterClass;
import org.junit.Before;
import org.junit.BeforeClass;
import org.junit.Test;

/**
 * <p>Title: Game.class Unit Tests </p>
 * <p>Description: CSIS 343 Course Project</p>
 * 
 * @author Nick Brown
 * @email  nicholas.brown@my.uwrf.edu
 * @author John Wagner 
 * @email  john.wagner@my.uwrf.edu
 * 
 * @date December 1st 2013
 *
 */
public class GameTests {
	//instances of Game class
	private tatrus.Game g;

	/**
	 * @throws java.lang.Exception
	 */
	@BeforeClass
	public static void setUpBeforeClass() throws Exception {
	}

	/**
	 * @throws java.lang.Exception
	 */
	@AfterClass
	public static void tearDownAfterClass() throws Exception {
	}

	/**
	 * Initializes above Game class instance to set up
	 * for tests. Starts a new game each pass.
	 * @throws java.lang.Exception
	 */
	@Before
	public void setUp() throws Exception {
	g = new tatrus.Game();
	g.startNewGame();
	}

	/**
	 * Tears down game instance after each test
	 * pass.
	 * @throws java.lang.Exception
	 */
	@After
	public void tearDown() throws Exception {
	g = null;
	}

	/**
	 * Test method for {@link tatrus.Game#getScore()}.
	 * Tests to make sure the game starts at 0 for score.
	 */
	@Test
	public final void testGetScore() {
		assertEquals(0, g.getScore());
	}

	/**
	 * Test method for {@link tatrus.Game#getLevel()}.
	 * Tests to make sure the game starts at level 1.
	 */
	@Test
	public final void testGetLevel() {
		assertEquals(1, g.getLevel());
	}

	/**
	 * Test method for {@link tatrus.Game#getCurrentColumn()}.
	 * Tests to make sure shapes start at column 4, or the starting
	 * column.
	 */
	@Test
	public final void testGetCurrentColumn() {
		assertEquals(4, g.getCurrentColumn());
	}

	/**
	 * Test method for {@link tatrus.Game#getCurrentRow()}.
	 * Tests to make sure shapes start at row 1, or the starting
	 * row.
	 */
	@Test
	public final void testGetCurrentRow() {
		assertEquals(1, g.getCurrentRow());
	}
}
